Socket
Socket
Sign inDemoInstall

@hotwired/stimulus-webpack-helpers

Package Overview
Dependencies
1
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hotwired/stimulus-webpack-helpers

Webpack helpers for Stimulus.


Version published
Weekly downloads
197K
increased by1.33%
Maintainers
2
Install size
7.32 kB
Created
Weekly downloads
 

Readme

Source

Stimulus Stimulus Webpack Helpers

Using Stimulus Webpack Helpers

Call webpack's require.context helper with the path to the folder containing your Stimulus controllers. Then, pass the resulting context to the Application#load method using the definitionsFromContext helper:

// src/application.js
import { Application } from "@hotwired/stimulus"
import { definitionsFromContext } from "@hotwired/stimulus-webpack-helpers"

window.Stimulus = Application.start()
const context = require.context("./controllers", true, /\.js$/)
Stimulus.load(definitionsFromContext(context))

Getting Help & Contributing Back

Looking for the docs? Once you've read through the Handbook, consult the Stimulus Reference for API details.

Have a question about Stimulus? Connect with other Stimulus developers on the Hotwire Discourse community forum.

Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!

We expect all Stimulus contributors to abide by the terms of our Code of Conduct.

Acknowledgments

Stimulus is MIT-licensed open-source software from Basecamp, the creators of Ruby on Rails.

Continuous integration VMs generously provided by Sauce Labs.


© 2021 Basecamp, LLC.

FAQs

Last updated on 24 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc